#include "NodeFactory.h"
#include "GainNode.h"
#include "DisplayNode.h"
#include "SineWaveNode.h"
#include "MultNode.h"
#include "SumNode.h"
#include "ConsNode.h"
#include "CacheNode.h"

AbsCalNode* NodeFactory::createNode(QString name)
{
    if (name == "Sine") {
        return new SineWaveNode;
    } else if (name == "Disp") {
        return new DisplayNode;
    } else if (name == "Gain") {
        return new GainNode;
    } else if (name == "Mult") {
        return new MultNode;
    } else if (name == "Cons") {
        return new ConsNode;
    } else if (name == "Sum") {
        return new SumNode;
    } else if (name == "Sampler") {
        return new CacheNode(10);
    }
    return nullptr;
}
